﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel;

namespace S4Store.Domain
{
    public class ImproveGuide
    {
        public enum ImproveGuideType
        {
            /// <summary>
            /// 销售指导建议
            /// </summary>
            [Description("销售指导建议")]
            Sale = 1,

            /// <summary>
            /// 售后指导建议
            /// </summary>
            [Description("售后指导建议")]
            AfterSale = 2,

            /// <summary>
            /// 营销指导建议
            /// </summary>
            [Description("营销指导建议")]
            Markting = 3
        }

        public enum Status
        {
            [Description("草稿")]
            Draft = 1,

            [Description("已发送")]
            Official =2
        }


        public int Id { get; set; }
        public int StoreId { get; set; }
        public int Type { get; set; }
        public int ImproveUserId { get; set; }
        public DateTime ImproveDate { get; set; }
        public String ImproveContent { get; set; }
        public int StatusValue { get; set; }
        public bool IsRead { get; set; }
        public bool IsManagerRead { get; set; }
        public String ReferenceDesc { get; set; }
        public String ReferenceUrl { get; set; }


        public virtual Store Store { get; set; }
        [NotMapped]
        public ImproveGuideType GuideType
        {
            get { return Type.ToEnum<ImproveGuideType>(); }
            set { Type = value.ToInt(); }
        }

    }

}
